package com.cn.wanxi.model;

import java.util.ArrayList;
import java.util.List;

public class ProductModel {
    private String imgHref;
    private String name;
    private String content;
    private String price;
    public String[] imgHrefs = {"../img/9_8hh4.jpg","../img/9_8hh4.jpg","../img/9_8hh4.jpg","../img/9_8hh4.jpg","../img/9_8hh4.jpg","../img/9_8hh4.jpg","../img/9_8hh4.jpg","../img/9_8hh4.jpg"};
    public String[] names = {"麻婆豆腐","麻婆豆腐","麻婆豆腐","麻婆豆腐","麻婆豆腐","麻婆豆腐","麻婆豆腐","麻婆豆腐"};
    public String[] contents = {"原料:猪五花肉500克、荔浦芋头400\n量克、青菜适、\n","原料:猪五花肉500克、荔浦芋头400\n量克、青菜适、\n","原料:猪五花肉500克、荔浦芋头400\n量克、青菜适、\n","原料:猪五花肉500克、荔浦芋头400\n量克、青菜适、\n","原料:猪五花肉500克、荔浦芋头400\n量克、青菜适、\n","原料:猪五花肉500克、荔浦芋头400\n量克、青菜适、\n","原料:猪五花肉500克、荔浦芋头400\n量克、青菜适、\n","原料:猪五花肉500克、荔浦芋头400\n量克、青菜适、\n"};
    public String[] prices = {"4:00","4:00","4:00","4:00","4:00","4:00","4:00","4:00"};

    public List<ProductModel> getProductModelList(){
        HomeModel homeModel = new HomeModel();
        List<ProductModel> productList = new ArrayList<>();
        for (int i = 0; i < homeModel.productImgs.length; i++) {
            ProductModel productModel = new ProductModel();
            productModel.setImgHref(homeModel.productImgs[i]);
            productModel.setName(homeModel.productNames[i]);
            productModel.setContent(homeModel.productContents[i]);
            productList.add(productModel);
        }
        return productList;
    }
    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getImgHref() {
        return imgHref;
    }

    public void setImgHref(String imgHref) {
        this.imgHref = imgHref;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
